﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/MainMaster.Master" AutoEventWireup="true" CodeBehind="WebFormDealers.aspx.cs" Inherits="CustomersSuppliersWebApplication.WebFormDealers" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTextBoxSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxImportance">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxTypeOfTrade">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxProducts">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadDatePickerFrom">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadDatePickerTo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxDealersClassifications">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxCountries">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

    <telerik:RadDockZone ID="RadDockZoneMiddle" runat="server" SkinID="RadDockZoneContent" CssClass="MinimumPageHeight">
        <telerik:RadDock ID="RadDockSearch" runat="server" Title="بحث" AllowedZones="RadDockZoneMiddle" SkinID="RadDockSearch" CssClass="MarginTop">
            <ContentTemplate>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelSearch" runat="server" Text="بحث عام"></asp:Label>
                    <telerik:RadTextBox ID="RadTextBoxSearch" runat="server" SkinID="RadTextBoxSearch" OnTextChanged="RadTextBoxSearch_TextChanged"></telerik:RadTextBox>
                </div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelImportance" runat="server" Text="الاهمية"></asp:Label>
                    <telerik:RadComboBox ID="RadComboBoxImportance" runat="server" SkinID="RadComboBoxSearch" OnSelectedIndexChanged="RadComboBox_SelectedIndexChanged"></telerik:RadComboBox>
                </div>
                <div class="Clear"></div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelTypeOfTrade" runat="server" Text="التجارة"></asp:Label>
                    <telerik:RadComboBox ID="RadComboBoxTypeOfTrade" runat="server" SkinID="RadComboBoxSearch" OnSelectedIndexChanged="RadComboBox_SelectedIndexChanged"></telerik:RadComboBox>
                </div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelProducts" runat="server" Text="المنتج"></asp:Label>
                    <telerik:RadComboBox ID="RadComboBoxProducts" runat="server" SkinID="RadComboBoxSearch" OnSelectedIndexChanged="RadComboBox_SelectedIndexChanged"></telerik:RadComboBox>
                </div>
                <div class="Clear"></div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelDealersClassifications" runat="server" Text="التصنيف"></asp:Label>
                    <telerik:RadComboBox ID="RadComboBoxDealersClassifications" runat="server" SkinID="RadComboBoxSearch" OnSelectedIndexChanged="RadComboBox_SelectedIndexChanged"></telerik:RadComboBox>
                </div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelCountries" runat="server" Text="الدولة"></asp:Label>
                    <telerik:RadComboBox ID="RadComboBoxCountries" runat="server" SkinID="RadComboBoxSearch" OnSelectedIndexChanged="RadComboBox_SelectedIndexChanged"></telerik:RadComboBox>
                </div>
                <div class="Clear"></div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelFrom" runat="server" Text="من"></asp:Label>
                    <telerik:RadDatePicker ID="RadDatePickerFrom" runat="server" SkinID="RadDatePickerSearch" AutoPostBack="true" OnSelectedDateChanged="RadDatePicker_SelectedDateChanged">
                    </telerik:RadDatePicker>
                </div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelTo" runat="server" Text="الى"></asp:Label>
                    <telerik:RadDatePicker ID="RadDatePickerTo" runat="server" SkinID="RadDatePickerSearch" AutoPostBack="true" OnSelectedDateChanged="RadDatePicker_SelectedDateChanged">
                    </telerik:RadDatePicker>
                </div>
                <div class="Clear"></div>
            </ContentTemplate>
        </telerik:RadDock>

        <telerik:RadDock ID="RadDockResults" runat="server" Title="النتائج" AllowedZones="RadDockZoneMiddle" Height="400px" SkinID="RadDockResults" CssClass="MarginTop">
            <ContentTemplate>
                <div class="MarginTop">
                    <telerik:RadGrid ID="RadGridResults" runat="server" SkinID="RadGridPrimary" CellSpacing="0" GridLines="None" AutoGenerateColumns="False" ShowGroupPanel="True"
                        OnNeedDataSource="RadGridResults_NeedDataSource" OnItemCommand="RadGridResults_ItemCommand" OnInsertCommand="RadGridResults_InsertCommand" OnItemCreated="RadGridResults_ItemCreated"
                        OnItemDataBound="RadGridResults_ItemDataBound" OnUpdateCommand="RadGridResults_UpdateCommand" OnDeleteCommand="RadGridResults_DeleteCommand">
                        <MasterTableView DataKeyNames="Dealer_ID">
                            <Columns>
                                <telerik:GridBoundColumn DataField="Dealer_RowNumber" DataType="System.Int32" UniqueName="Dealer_RowNumber" HeaderText="الرقم" Display="false" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Dealer_ID" DataType="System.Guid" UniqueName="Dealer_ID" HeaderText="الكود" Display="False" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Dealer_Code" DataType="System.String" UniqueName="Dealer_Code" HeaderText="كود المستخدم" Display="true" EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Importance_NameAr" DataType="System.String" UniqueName="Importance_NameAr" HeaderText="الاهمية" Display="true" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="Importance_ID" HeaderText="الاهمية" Display="false" EditFormColumnIndex="1">
                                    <EditItemTemplate>
                                        <telerik:RadComboBox ID="RadComboBoxImportance" runat="server">
                                        </telerik:RadComboBox>
                                    </EditItemTemplate>
                                    <ItemTemplate></ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Dealer_NameAr" DataType="System.String" UniqueName="Dealer_NameAr" HeaderText="الاسم" Display="true" EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Dealer_NameEn" DataType="System.String" UniqueName="Dealer_NameEn" HeaderText="Name" Display="true" EditFormColumnIndex="1">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="DealerType_ID" HeaderText="النوع" Display="false" EditFormColumnIndex="0">
                                    <EditItemTemplate>
                                        <telerik:RadComboBox ID="RadComboBoxDealersTypes" runat="server">
                                        </telerik:RadComboBox>
                                    </EditItemTemplate>
                                    <ItemTemplate></ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="DealerClassification_NameAr" DataType="System.String" UniqueName="DealerClassification_NameAr" HeaderText="التصنيف" Display="true" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="DealerClassification_ID" HeaderText="التصنيف" Display="false" EditFormColumnIndex="1">
                                    <EditItemTemplate>
                                        <telerik:RadComboBox ID="RadComboBoxDealersClassifications" runat="server">
                                        </telerik:RadComboBox>
                                    </EditItemTemplate>
                                    <ItemTemplate></ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="TypeOfTrade_NameAr" DataType="System.String" UniqueName="TypeOfTrade_NameAr" HeaderText="التجارة" Display="true" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="TypeOfTrade_ID" HeaderText="التجارة" Display="false" EditFormColumnIndex="1">
                                    <EditItemTemplate>
                                        <telerik:RadComboBox ID="RadComboBoxTypeOfTrade" runat="server">
                                        </telerik:RadComboBox>
                                    </EditItemTemplate>
                                    <ItemTemplate></ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridDateTimeColumn DataField="Dealer_StartDate" DataFormatString="{0:dd/MM/yyyy}" UniqueName="Dealer_StartDate" HeaderText="بداية التعامل" EditFormColumnIndex="1">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridBoundColumn DataField="Dealer_Notes" UniqueName="Dealer_Notes" HeaderText="ملاحظات"  EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridEditCommandColumn UniqueName="EditColumn" ButtonType="ImageButton" CancelText="الغاء" EditText="تحرير" UpdateText="حفظ">
                                </telerik:GridEditCommandColumn>
                                <telerik:GridButtonColumn UniqueName="DeleteColumn" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="40px" ConfirmDialogType="RadWindow" ConfirmText="هل انت متاكد من عملية الحذف ؟" ConfirmTitle="حذف" Text="حذف">
                                </telerik:GridButtonColumn>
                                <telerik:GridRowIndicatorColumn Resizable="True" Visible="true">
                                </telerik:GridRowIndicatorColumn>
                            </Columns>
                            <NestedViewTemplate>
                                <div class="FloatRight">
                                    <telerik:RadButton ID="RadButtonContacts" runat="server" CommandName="Contacts" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonImage">
                                        <Image ImageUrl="ImageEditting.axd?U=~/Images/General/Contacts.png&amp;amp;W=80&amp;H=40" />
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonAddresses" runat="server" CommandName="Addresses" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonImage">
                                        <Image ImageUrl="ImageEditting.axd?U=~/Images/General/Building.png&amp;W=80&amp;H=40" />
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonProducts" runat="server" CommandName="Products" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonImage">
                                        <Image ImageUrl="ImageEditting.axd?U=~/Images/General/Product.png&amp;W=80&amp;H=40" />
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonBanks" runat="server" CommandName="BanksAcounts" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonImage">
                                        <Image ImageUrl="ImageEditting.axd?U=~/Images/General/BankAcount.png&amp;W=80&amp;H=40" />
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonAttachments" runat="server" CommandName="Attachments" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonImage">
                                        <Image ImageUrl="ImageEditting.axd?U=~/Images/General/Attachment.png&amp;W=80&amp;H=40" />
                                    </telerik:RadButton>
                                </div>
                                <div class="Clear"></div>
                                <div class="FloatRight">
                                    <telerik:RadButton ID="RadButtonContacts2" runat="server" Text="مسئولين الاتصال" CommandName="Contacts" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonInGrid">
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonAddresses2" runat="server" Text="العناوين" CommandName="Addresses" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonInGrid">
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonProducts2" runat="server" Text="المنتجات" CommandName="Products" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonInGrid">
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonBanks2" runat="server" Text="حسابات البنوك" CommandName="BanksAcounts" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonInGrid">
                                    </telerik:RadButton>
                                    <telerik:RadButton ID="RadButtonAttachments2" runat="server" Text="المرفقات" CommandName="Attachments" CommandArgument='<%# Eval("Dealer_ID") %>' SkinID="RadButtonInGrid">
                                    </telerik:RadButton>
                                </div>
                                <div class="Clear"></div>
                            </NestedViewTemplate>
                        </MasterTableView>
                    </telerik:RadGrid>
                </div>
            </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
</asp:Content>
